<!DOCTYPE html>
<html>
<head>
  <title><%= yield(:title) %></title>
  <%= favicon_link_tag image_path("favicon.ico") %>
  <%= csrf_meta_tags %>
  <%= csp_meta_tag %>

  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload' %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
</head>

<body class="<%= controller.controller_name %>">
<%= render "layouts/header" %>
<!--主要内容-->
<div class="container">
  <% flash.each do |message_type, message | %>
    <div class="alert alert-<%= message_type %>"><%= message %></div>
  <% end %>

  <div class="container">
    <div class="row">
      <div class="col-2">
        <%= render "layouts/side" %>
      </div>
      <div class="col-10">
        <%= yield %>
      </div>
    </div>
  </div>
</div>
<%= render "layouts/footer" %>
</body>
</html>
